package com.ruoyi.slope.human.drone.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.human.drone.mapper.SlopeDroneCollectionMapper;
import com.ruoyi.slope.human.drone.domain.SlopeDroneCollection;
import com.ruoyi.slope.human.drone.service.ISlopeDroneCollectionService;

/**
 * 无人机采集Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-27
 */
@Service
public class SlopeDroneCollectionServiceImpl implements ISlopeDroneCollectionService 
{
    @Autowired
    private SlopeDroneCollectionMapper slopeDroneCollectionMapper;

    /**
     * 查询无人机采集
     * 
     * @param id 无人机采集主键
     * @return 无人机采集
     */
    @Override
    public SlopeDroneCollection selectSlopeDroneCollectionById(Long id)
    {
        return slopeDroneCollectionMapper.selectSlopeDroneCollectionById(id);
    }

    /**
     * 查询无人机采集列表
     * 
     * @param slopeDroneCollection 无人机采集
     * @return 无人机采集
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeDroneCollection> selectSlopeDroneCollectionList(SlopeDroneCollection slopeDroneCollection)
    {
        return slopeDroneCollectionMapper.selectSlopeDroneCollectionList(slopeDroneCollection);
    }

    /**
     * 新增无人机采集
     * 
     * @param slopeDroneCollection 无人机采集
     * @return 结果
     */
    @Override
    public int insertSlopeDroneCollection(SlopeDroneCollection slopeDroneCollection)
    {
        slopeDroneCollection.setCreateTime(DateUtils.getNowDate());
        return slopeDroneCollectionMapper.insertSlopeDroneCollection(slopeDroneCollection);
    }

    /**
     * 修改无人机采集
     * 
     * @param slopeDroneCollection 无人机采集
     * @return 结果
     */
    @Override
    public int updateSlopeDroneCollection(SlopeDroneCollection slopeDroneCollection)
    {
        slopeDroneCollection.setUpdateTime(DateUtils.getNowDate());
        return slopeDroneCollectionMapper.updateSlopeDroneCollection(slopeDroneCollection);
    }

    /**
     * 批量删除无人机采集
     * 
     * @param ids 需要删除的无人机采集主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDroneCollectionByIds(Long[] ids)
    {
        return slopeDroneCollectionMapper.deleteSlopeDroneCollectionByIds(ids);
    }

    /**
     * 删除无人机采集信息
     * 
     * @param id 无人机采集主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDroneCollectionById(Long id)
    {
        return slopeDroneCollectionMapper.deleteSlopeDroneCollectionById(id);
    }
}
